package org.xczy.nacos.config;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
public class NacosConfigApplication {
  public static void main(String[] args) {
    ConfigurableApplicationContext run = SpringApplication.run(NacosConfigApplication.class, args);
    String name = run.getEnvironment().getProperty("user.name");
    String age = run.getEnvironment().getProperty("user.age");
    System.out.println("名字为：" + name);
    System.out.println("年龄为：" + age);
  }
}
